﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TN_CMS.Domain.Entities;

namespace TN_CMS.Domain.Abstract
{
    public interface ISysRoleRepository
    {
        IQueryable<SysRole> SysRoles { get; }

        List<SysRole> GetList(int pageIndex, int pageSize, out int total, string orderClause, string whereClause);

        /// <summary>
        /// Get system role by Id
        /// </summary>
        /// <param name="Id">AdminId</param>
        /// <param name="getInactive">Get Inactive role or not</param>
        /// <returns></returns>
        SysRole GetDetail(int id, bool getInactive = true);

        /// <summary>
        /// Save system role, use to update or create new one
        /// </summary>
        /// <param name="role">SysRole entity</param>
        /// <returns></returns>
        int Save(SysRole role);

        /// <summary>
        /// Delete role(s)
        /// </summary>
        /// <param name="Id">Role Id(s)</param>
        /// <returns></returns>
        int Delete(int[] ids);
    }
}
